<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{% block title %}首页{% endblock %}-图书商城</title>
    <link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap.css') }}">
    <link rel="icon" href="{{ url_for('static',filename='image/icon.png') }}">
    <script src="{{ url_for('static',filename='javaScript/jquery-3.2.1.js') }}"></script>
    <script src="{{ url_for('static',filename='javaScript/bootstrap.js') }}"></script>
    <link rel="stylesheet" href="{{ url_for('static',filename='css/base.css') }}">
    <script src="{{ url_for('static',filename='javaScript/base.js') }}"></script>
    <script src="{{ url_for('static',filename='javaScript/admin_base.js') }}"></script>
    <script src="{{ url_for('static',filename='javaScript/admin_view.js') }}"></script>
    <script src="{{ url_for('static',filename='javaScript/bootstrap-paginator.js') }}"></script>
    {% block head %}
    {% endblock %}
    {% from 'bootstrap/form.html' import render_form %}
</head>
<body>
{% block body_head %}

{% endblock %}
{% if get_flashed_messages() %}
    <script type="text/javascript">$(function () {
        alert('{{ get_flashed_messages()|first }}')
    })</script>
{% endif %}
<nav class="navbar navbar-default">
    <div class="container">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{{ url_for('admin_view') }}">图书商城</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="base-active nav-active"><a href="{{ url_for('admin_view') }}"><span
                        class="glyphicon glyphicon-home"
                        aria-hidden="true"></span>首页-管理员 </a></li>
            </ul>
            <form class="navbar-form navbar-left" action="{{ url_for('admin_query') }}">
                <div class="form-group">
                    <select class="form-control" name="search_type">
                        <option value="order">订单</option>
                        <option value="book">图书</option>
                        <option value="book_classify">图书分类</option>
                    </select>
                    <input type="text" name="search_str" class="form-control" placeholder="请输入">
                </div>
                <button type="submit" class="btn btn-default btn-search">查找</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li class="base-active nav-active"><a href="/admin{{ url_for('personal_information') }}">{{ user.username }}</a>
                </li>
                <li class="base-active nav-active"><a href="/admin{{ url_for('logout') }}">注销</a></li>
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
<div class="container base-center main-div">
    <div class="container left pull-left">
        {% block left %}
            <ul class="nav nav-pills nav-stacked">
                <li role="presentation" class="base-active active aj"><a href="{{ url_for('book_classify_manage') }}">图书管理</a></li>
                <li role="presentation" class="base-active active aj"><a href="{{ url_for('admin_order_manage') }}">订单管理</a></li>
                <li role="presentation" class="base-active active aj"><a href="javascript:void(0);" data-href="{{ url_for('admin_comments_view') }}">查看所有评论</a></li>
                <li role="presentation" class="base-active active aj"><a href="javascript:void(0);" data-href="{{ url_for('admin_comments_manage_by_book') }}">查看所有图书</a></li>
                <li role="presentation" class="base-active active aj"><a href="{{ url_for('admin_carousel') }}">滚屏图片</a></li>
            </ul>
        {% endblock %}
    </div>
    <div class="container main pull-left pagination-fill-div">
        {% block main %}{% endblock %}
    </div>
</div>
</body>
</html>